<?php
//我的提案

function weiyuan_default(){
    weiyuan_page();
}
function weiyuan_page(){
    _output_template(0,'weiyuan');
}


function _zhengxie_outputWeiyuan(){
    $nav_name = '委员信息:';
    $str= " <div style='padding: 25px; border-radius: 10px;height: 93%;background-color: white; -webkit-box-shadow: #e2f0fe 0px 0px 10px;-moz-box-shadow: #e2f0fe 0px 0px 10px;box-shadow: #e2f0fe 0px 0px 10px;'>
                <div style='width: 100%;min-height: 120px;height: 10%'>
                    <div class='mark' id='".$GLOBALS['ACTION']."' style='color: #429de3;height: 50%;font-size: 18px;'>".$nav_name."</div>
                    <div style='height: 50%;'>";

    $str.="         <div class='box' style='float: left;height: 100%;display: inline-block;position: relative;top: 50%;transform: translateY(-50%)'>
                        <span style='font-size: 16px;float: left;height: 40px;line-height: 40px;margin-right: 15px;position: relative;top: 50%;transform: translateY(-50%)'>届次:</span>
                        <span class='select' style='background-image: url(images/wode/sanjiao.png);background-repeat: no-repeat;background-position: 90%;;font-size: 16px;color: #666;text-indent: 15px;border: 1px solid #e5e5e5;float: left;border-radius: 4px;width:204px;height:40px;line-height:40px;position: relative;top: 50%;transform: translateY(-50%)'>所有委员</span>
                    </div>";

    $str .= "
                        <ul class='sub'>
                            <li>12</li>
                            <li>13</li>
                            <li>14</li>
                            <li>15</li>
                            <li>16</li>
                            <li>17</li>
                            <li>18</li>
                            <li>19</li>
                            <li>20</li>";

                $str.="</ul>
                        <style>
                            .sub{list-style-type:none;}
                            .select{font-size: 16px;color: #666;text-indent: 15px;border: 1px solid #e5e5e5;float: left;border-radius: 4px;width:204px;height:40px;cursor:pointer;line-height:40px;}
                            .sub{font-size: 16px;position: absolute;top: 246px;left:314px;color:#e5e5e5;width:204px;background:#fff;border:1px solid #e5e5e5;display: none;}
                            .sub li{color: #666666;height:40px;text-align: center;line-height:40px;cursor:pointer;border-bottom:1px solid #e5e5e5;}
                            .sub li.hover{background:#8b8b8b;}
                        </style>
                        <script type='text/javascript'>
                            $('.select').click(function(event) {
                                $('.sub').css('display') == 'none' ? $('.sub').css('display','block') : $('.sub').css('display','none');
                            });
                            
                            $('.sub li').each(function() {
                                $(this).mouseover(function() {
                                    $(this).css('background-color','#429de3');
                                });
                                
                                $(this).mouseout(function() {
                                    $(this).css('background-color','#fff');
                                });
                                
                                $(this).click(function() {
                                  var text = $(this).text();
                                  $('.select').html('20'+text+'届');
                                  getweiyuanList(text);
                                  $('.sub').css('display','none');
                                });
                            });
                        </script>
                        ";


 $str.= "           <div style='display: inline-block;width: 33%;height: 100%;margin-left: 10%;float: left'>
                        <div style='height: 54px;position: relative;top: 50%;transform: translateY(-50%);'>
                            <span style='font-size: 16px;float: left;height: 50px;line-height: 50px;'>姓名:</span>
                            <div style='padding-left: 80px;position: relative;top: 50%;transform: translateY(-50%)'>
                                <input class='weiyuan_keyword' type='text' style='font-size: 16px;color: #666;height: 40px;width: 100%;border: 1px solid #e5e5e5;border-radius: 4px;'>
                            </div>
                        </div>
                    </div>
                    
                    <div style='display: inline-block; height: 100%;float: left;margin-left: 15px'>
                        <div style='height: 54px;position: relative;top: 50%;transform: translateY(-50%);'>
                            <button onclick='serachWeiyuan();' style='font-size: 16px;color: white;border-radius: 5px;background-color: #42d79e;width: 76px;height: 41px;margin-right: 15px;margin-left: 15px;border: none'>查询</button>
                            <button onclick='clearWeiyuan();' style='font-size: 16px;color: #42d79e;border-radius: 5px;border: 1px solid #42d79e;background-color: #fff;width: 76px;height: 41px;'>重置</button>
                        </div>
                    </div>";

    if (empty($_REQUEST['page'])){
        $page = 1;
    }else{
        $page = $_REQUEST['page'];
    }

    $str .= "               
                    </div>
                </div>
                <div style='min-height: 750px;width: 100%;height: 85%;margin-top:3%;'>
                    <div class='datalist' id='".$page."' style='height: 90%;'>
                    </div>
                    
                    <div  style='height: 10%; position: relative'>
                        <div  style='display: inline-block;position: absolute;top: 28%;left: 50%;transform: translateX(-50%)'>
                            <div class='listtab' style='display: inline-block'></div>
                        </div>
                    </div>
                    <script>getweiyuanList('')</script>
                </div>
            </div>";
    return $str;

}

function _zhengxie_outputWeiyuanDialog(){
    if (!empty($_REQUEST['id'])){
        $userinfo = getUserInfo($_REQUEST['id']);
        $str = "<script> showdialog(); </script>";
        $str .= "<div style='width:680px;height:480px;background-color: white;position: relative;top: 18%;left: 36%;border-radius: 8px;display: block'>
                    <div style='height: 75px;background-color: #3e8ffe;border-top-left-radius: 8px;border-top-right-radius: 8px;color: white;font-size: 17px;line-height: 75px;text-align: center'>
                        <span style='position: absolute;left: 50%;transform: translateX(-50%);'>查看个人资料</span>
                        <div class='main_dialog_cuohao' onclick='dissmissdialog();' style='background-image: url(images/main/cuohao.png);background-position: center;background-repeat:no-repeat;background-size: 15px;width:40px;height: 75px;float: right'></div>
                    </div>
                    
                    <div style='width: 100%;height: 310px;padding-top: 20px;padding-left: 30px'> 
                        <div style='width: 100%;height:190px;float: left'>
                                 
                                 <div style='width:419px;height: 200px;display: inline-block;float: left'>
                                    <div style='width: 419px;'>
                                        <div style='height: 50px;width:400px;margin: 0px auto'>
                                            <div style='float: left;height:40px;line-height: 40px;color: #444;font-size: 16px;width: 90px'>姓名:</div>
                                            <span class='input_name' style='text-indent: 12px;border-radius: 4px;font-size: 16px;width: 270px;height: 40px;border: 1px solid #f5faff;background-color: #fafdff;float: left;line-height: 40px' >".$userinfo['realname']." </span>
                                        </div>
                                    </div>
                                    
                                    <div style='width: 419px;margin-top: 15px'>
                                        <div style='height: 50px;width:400px;margin: 0px auto'>
                                            <div style='float: left;height:40px;line-height: 40px;color: #444;font-size: 16px;width: 90px'>年龄:</div>
                                            <span class='input_age' style='text-indent: 12px;border-radius: 4px;font-size: 16px;width: 270px;height: 40px;border: 1px solid #f5faff;background-color: #fafdff;float: left;line-height: 40px' >".$userinfo['age']." <span>
                                        </div>
                                    </div>
                                    
                                    <div style='width: 419px;margin-top: 15px'>
                                        <div style='height: 50px;width:400px;margin: 0px auto'>
                                           <div style='float: left;height:40px;line-height: 40px;color: #444;font-size: 16px;width: 90px'>党派团体:</div>
                                           <span class='input_party' style='color:#444;text-indent: 12px;border-radius: 4px;font-size: 16px;width: 270px;height: 40px;border: 1px solid #f5faff;background-color: #fafdff;float: left;line-height: 40px' >".$userinfo['party']."</span>
                                        </div>
                                    </div>
                                 </div>
                            
                            <ul class='sub1'>
                            </ul>
                            <style>
                                    .sub1{list-style-type:none;height: 122px;overflow: auto}
                                    .input3{font-size: 16px;color: #666;text-indent: 15px;border: 1px solid #e5e5e5;float: left;border-radius: 4px;width:204px;height:40px;cursor:pointer;line-height:40px; 
                                     background-image: url(images/wode/sanjiao.png);background-position: 240px;background-repeat: no-repeat;}
                                    .sub1{font-size: 16px;position: absolute;top: 274px;left:130px;color:#e5e5e5;width:269px;background-color: #ffffff;border:1px solid #e5e5e5;display: none}
                                    .sub1 li{color: #999;height:40px;text-align: center;line-height:40px;cursor:pointer;border-bottom:1px solid #e5e5e5;}
                                    .sub1 li.hover{background:#fafdff;}
                            </style>
                            <script> 
                             $('.input3').click(function(event) {
                                        $('.sub1').css('display') == 'none' ? $('.sub1').css('display','block') : $('.sub1').css('display','none');
                                    });
                                    $('.sub1 li').each(function() {
                                        
                                        $(this).mouseover(function() {
                                            $(this).css('background-color','#fafdff');
                                        });
                                        
                                        $(this).mouseout(function() {
                                            $(this).css('background-color','#fff');
                                        });
                                        
                                        $(this).click(function() {
                                          var text = $(this).text();
                                          $('.input3').html(text);
                                          $('.sub1').css('display','none');
                                        });
                                    });
                           </script>
                           <div style='padding-left: 150px;height: 1%;float: left'>
                                <div type='text' style='color: #c9c9c9;font-size: 20px;width: 100%;position: relative;top: -180px;left: 290px;height: 90px;'>
                                    <div class='avatar-list' style='width: 91%;'>
                                        <img class='avatar-grid'>
                                            <input class='shangchuan' type='file' accept='image/*'>
                                        </img>
                                        <div style='clear:both'></div>
                                    </div>
                                </div>
                           </div>
                        </div>
                        
                        <style>
                                .avatar-grid{
                                    height: 130px;
                                    width: 130px;
                                    color: #f2f2f2;
                                    float: left;
                                    margin-left: 1px;
                                    margin-top: 1px;
                                    margin-bottom: 1px;
                                    font-size: 30px;
                                    line-height: 130px;
                                    text-align: center;
                                    cursor: pointer;
                                    border: 1px solid #f2f2f2;
                                    background-image: url(images/main/shangchuan1.png);
                                    background-repeat: no-repeat;
                                    background-position: center;
                                }
                                
                                .shangchuan{
                                    position: relative;
                                    top:-130px;
                                    cursor: pointer;
                                    opacity: 0;
                                    height: 130px;
                                    width: 130px;
                                }
                        </style>
                        
                        <div style='clear: both'></div>
                        <div style='width: 100%;height:130px;padding-left: 9px;'>
                            <div style='width: 620px;margin-top: 5px'>
                                <div style='height: 42px;width:620px;margin: 0px auto;'>
                                    <div style='float: left;height:42px;line-height: 42px;color: #444;font-size: 16px;width: 90px;'>工作单位:</div>
                                    <span class='input_work' style='line-height: 42px;text-indent: 12px;border-radius: 4px;font-size: 16px;width: 495px;height: 42px;border: 1px solid #f5faff;background-color: #fafdff;float: left;' >".$userinfo['work']."</span>
                                </div>
                            </div>
                            
                            <div style='width: 620px; margin-top: 20px'>
                               <div style='height: 42px;width:620px;margin: 0px auto;'>
                                   <div style='float: left;height:42px;line-height: 42px;color: #444;font-size: 16px;width: 90px'>联系方式:</div>
                                   <span class='input_cotactway' style='line-height: 42px;text-indent: 12px;border-radius: 4px;font-size: 16px;width: 495px;height: 42px;border: 1px solid #f5faff;background-color: #fafdff;float: left;' >".$userinfo['phone']."</span>
                               </div>
                            </div>
                        </div>
                    </div>
                    
                    <div style='width: 100%;height: 78px;background-color: #f0f6ff;border-bottom-left-radius: 8px;border-bottom-right-radius: 8px;display: flex;align-items: center'> 
                        <div class='main_bottom_dialog_queding' onclick='dissmissdialog();' style='width: 210px;height: 48px;background-color: #3e8ffe;border-radius:10px;text-align: center;line-height: 48px;color: white;font-size: 16px;margin: 0px auto;'>
                            返回
                        </div>
                    </div>
                </div>";

    }



    return $str;
}